﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;

namespace Services {
    public class Utility {
        public static Dictionary<string, object> GetAllProperties(object obj) {
            Dictionary<string, object> ret = new Dictionary<string, object>();
            PropertyInfo[] pInfo = obj.GetType().GetProperties();
            foreach (var item in pInfo) {
                ret.Add(item.Name.ToUpper(), item.GetValue(obj, null));
            }

            return ret;
        }
    }
}